<template>
    <view class="content">
        <view class="detail">
            <u-parse :content="data.content"></u-parse>
        </view>
    </view>
</template>

<script>
export default {
        data() {
            return {
                id:0,
                data:{}
            }
        },
        onLoad(e) {
            this.id = e.id
            this.loadData()
        },
        methods: {
            loadData(){
                let params = {
                    id: this.id,
                }
                uni.$u.http.get('/page/detail',{params: params}).then((res) => {
                    if(res.code==1){
                        this.data = res.data
                        uni.setNavigationBarTitle({
                            title:res.data.title
                        })
                    }
                })
            }
        }
    }
</script>

<style lang="scss">
.content{
        padding: 20px;
        .time{
            font-size: 12px;
            display: flex;
            justify-content: space-between;
            color: #888888;
        }
        .detail{
            padding: 10px 0;
        }
        .detail /deep/img{ max-width: 100%!important;}
    }
</style>
